Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add note to RequiredArgsError when there are flags with multiple #754

Merged
merged 1 commit into from
Aug 2, 2023

Conversation

mdonnalley
Copy link
Contributor

@mdonnalley mdonnalley commented Aug 1, 2023

Adds note to RequiredArgsError whenever an arg is missing and there are flags that take multiple values. This note advises the user to specify all their arguments before specifying the flags OR to use -- to separate the flags from the args

~/code/example-cli » bin/dev hello --from val1 val2  arg1
Error: Missing 1 required arg:
person  Person to say hello to

Note: --from allows multiple values. Because of this you need to provide all arguments before providing that flag.
Alternatively, you can use "--" to signify the end of the flags and the beginning of arguments.
See more help with --help

Fixes #496

@W-13600613@

@mshanemc mshanemc merged commit ed359a7 into main Aug 2, 2023
@mshanemc mshanemc deleted the mdonnalley/multi-flags-and-args branch August 2, 2023 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

argument not read, if after a flag with multiple: true
2 participants